package 代码记录.Bit48天集训;

import java.util.Scanner;

/**答案已订正
 * 1.两种排序方法
 * 2.求最小公倍数
 * @author zx
 * @create 2022-04-26 16:09
 */
public class day_08 {

    public static void main2(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] arr = new String[n];
        sc.nextLine();
        for(int i = 0;i < n;i++){
            arr[i] = sc.nextLine();
        }
        boolean flag1 = true;
        boolean flag2 = true;
        //判断是否满足字典序
        for(int i = 0;i < arr.length - 1;i++){
            //compareTo():按字典序比较
            if(arr[i].compareTo(arr[i + 1]) > 0){
                flag1 = false;
            }
        }
        //判断是否满足长度排序
        for(int i = 0;i < arr.length - 1;i++){
            if(arr[i].length() > arr[i + 1].length()){
                flag2 = false;
            }
        }
        if(flag1 == true && flag2 == true){
            System.out.println("both");
        }else if(flag1 == true && flag2 == false){
            System.out.println("lexicographically");
        }else if(flag1 == false && flag2 == true){
            System.out.println("lengths");
        }else{
            System.out.println("none");
        }
    }

    /**
     * @param args gcd模板
     */
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        System.out.println(lcm(a,b));
    }
    private static int gcd(int a,int b){
        return b == 0 ? a : gcd(b,a % b);
    }
    private static int lcm(int a, int b){
        return a / gcd(a,b) * b;//最小公倍数 = 两数之积 ÷ 两数最大公约数
    }
}
